home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.0 / card_14916.txt < prev    next >
Text File  |  1989-02-26  |  1KB  |  37 lines

  1. -- card: 14916 from stack: in.0
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 2202
  5. -- name: GetFullPath
  6.  
  7.  
  8. -- part contents for background part 10
  9. ----- text -----
  10. 2
  11.  
  12. -- part contents for background part 2
  13. ----- text -----
  14. --
  15. -- GetFullPath: a function to find the full path name of an application,
  16. -- document or stack. The pathlist is one of 3 globals: applications,
  17. -- documents or stacks- see getHomeInfo in the Home stack's stack script
  18. -- For instance:
  19. --      global stacks
  20. --      put GetFullPath("Browser",stacks) into bpath
  21. -- should compute the full pathname of the Browser stack (if the "Look
  22. -- for stacks in:" card in the Home stack is up to date).
  23. --
  24. function GetFullPath name,pathlist
  25.   repeat with i = 1 to the number of lines in pathlist
  26.     if line i of pathlist is empty then next repeat -- sanity check
  27.     put line i of pathlist & name into fname
  28.     if FileModDate(fname,true) is not empty then -- found it
  29.       return fname
  30.     end if
  31.   end repeat
  32.   return empty   -- file not found in pathlist
  33. end GetFullPath
  34.  
  35. -- part contents for background part 3
  36. ----- text -----
  37. GetFullPath